Gen2 V2 Commands

Readers which support Gen2 V2 commands report the same in the field IsG2V2CommandSupported of ReaderCapabilities as true. The following operations can be performed on Gen2 V2 commands in TagAccess class:      

  1. AuthenticateWait / AuthenticateEvent - This API allows reader to perform mutual authentication with tag

TagData readAccessTag;

byte[] TAM1 = { 0x00, 0x00, (byte)0x96, 0x56, 0x44, 0x02, 0x37, (byte)0x57, (byte)0x96, (byte)0xC6, (byte)0x96, (byte)0x64 };

TagAccess tagAccess = new TagAccess();

TagAccess.AuthenticateAccessParams authenticateParams = tagAccess.new AuthenticateAccessParams();

authenticateParams.setSenResp(true);

authenticateParams.setIncRespLen(true);

authenticateParams.setCSI((byte)0);

authenticateParams.setMessageBitLength((short)96);

authenticateParams.setMessage(TAM1);

authenticateParams.setAccessPassword(1);

String epc = "DADACAFEDADACAFEDADACAFE";

readAccessTag = reader.Actions.TagAccess.AuthenticateWait(epc, authenticateParams, null);

  1. ReadBufferWait / ReadBufferEvent - This API allows reader to read data stored in a Tag’s ResponseBuffer.

    TagData readAccessTag;

    TagAccess tagAccess = new TagAccess();

    TagAccess.ReadBufferAccessParams readBufferAccessParams = tagAccess.new ReadBufferAccessParams();

    readBufferAccessParams.setWordPtr((short)0);

    readBufferAccessParams.setBitCount((short)0x80);

    readBufferAccessParams.setAccessPassword(1);

    String epc = "DADACAFEDADACAFEDADACAFE";

    readAccessTag = reader.Actions.TagAccess.ReadBufferWait(epc, readBufferAccessParams, null);

  1. UntraceableWait / UntraceableEvent - This API performs Untraceable command and allows to reader alter U bits in EPC memory, hide memory (EPC, TID, user memory), reduce operating range.

TagData readAccessTag;

TagAccess tagAccess = new TagAccess();

TagAccess.UntraceableAccessParams untraceParams = tagAccess.new UntraceableAccessParams();

untraceParams.setAssertU(true); ;

untraceParams.setHideEPC(false);

untraceParams.setHideTID(TID_HIDE_STATE.TID_HIDE_NONE);

untraceParams.setHideUser(false);

untraceParams.setOperatingRange(TAG_OPERATING_RANGE.RANGE_NORMAL);

untraceParams.setEPCLength((byte)6);

String epc = "DADACAFEDADACAFEDADACAF1";

readAccessTag = reader.Actions.TagAccess.UntraceableWait(epc, untraceParams, null);

  1. CryptoWait / CryptoEvent - This API performs crypto function with tag

TagData readAccessTag;

TagAccess tagAccess = new TagAccess();

TagAccess.CryptoAccessParams cryptoAccessparams = tagAccess.new CryptoAccessParams();

cryptoAccessparams.setAccessPassword(1);

cryptoAccessparams.setBlockCount((byte)0x01);

cryptoAccessparams.setCustomData(true);

cryptoAccessparams.setProtMode((byte)0x01);

cryptoAccessparams.setProfile((byte)0x01);

cryptoAccessparams.setOffset((byte)0x00);

int[] ichallenge = new int[3];

ichallenge[0] = 0x96564402;

ichallenge[1] = 0x2375796C;

ichallenge[2] = 0x96640000;

cryptoAccessparams.setIChallenge(ichallenge);

cryptoAccessparams.setKeyID((byte)0x01);

String epc = "DADACAFEDADACAFEDADACAF1";

readAccessTag = reader.Actions.TagAccess.CryptoWait(epc, cryptoAccessparams, null);